package com.t114514.demo.mapper;

import com.t114514.demo.pojo.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface StudentMapper {
    @Select("select * from student where studentAccount = #{studentAccount}")
    Student selectStudent(String studentAccount);

    @Insert("insert into student(studentAccount, studentPassword,studentName) values(#{studentAccount}, #{password},#{studentName})")
    void insertStudent(String studentAccount, String password, String studentName);

    @Update("update student set studentPassword = #{studentPassword},studentName=#{studentName} where studentAccount = #{studentAccount}")
    void updateStudent(Student student);

}
